package com.x.erp.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.x.erp.model.Car;
import com.x.erp.model.User;
import com.x.erp.rpc.ChuanCheRpcService;
import com.x.framework.controller.BaseController;
import com.x.framework.controller.ResultCode;
import com.x.framework.controller.ResultModel;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 传车
 */
@RestController
@RequestMapping("/chuanChe")
public class ChuanCheController extends BaseController{

	@Reference
	private ChuanCheRpcService chuanCheRpcService;

	/**
	 * 传车方法
	 * @param
	 * @return
	 */
	@RequestMapping(value = "/chuanChe", method = {RequestMethod.POST, RequestMethod.GET})
	public ResultModel chuanChe() {
		Car car = new Car();
		//chuanCheRpcService.chuanChe(car);
		return new ResultModel(ResultCode.RESULT_SUCCESS, "上传成功");
	}

	/**
	 *
	 * @param
	 * @return
	 */
	@RequestMapping(value = "/chuanShop", method = {RequestMethod.POST, RequestMethod.GET})
	public ResultModel chuanShop() {
		User user = new User();
		chuanCheRpcService.chuanShop(user);
		return new ResultModel(ResultCode.RESULT_SUCCESS, "上传成功");
	}

}
